package com.heima.api.feign;

import com.heima.model.article.dtos.ArticleDto;
import com.heima.model.article.pojos.ApArticle;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.search.dtos.SearchArticleVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient("leadnews-article")
@Component
public interface ApArticleFeignClient {

    /**
     * 保存三剑客
     * @return
     */
    @PostMapping("api/v1/article/save")
    public ResponseResult save(@RequestBody ArticleDto dto);

    @GetMapping("api/v1/article")
    public SearchArticleVo getlist(@PathVariable Integer id);


}
